package org.pzy.java.jvm;

/**
 * @Author: DRevelation
 * @Date: 2022/8/29 16:02
 */

/**
 * javap -v ShowByteCode.class
 *
 Classfile /D:/gitee/framework-base/java/target/classes/org/pzy/java/base/ShowByteCode.class
 Last modified 2022-8-29; size 576 bytes
 MD5 checksum d90eb5c4350dc60f40d53646573efc0e
 Compiled from "ShowByteCode.java"
 public class org.pzy.java.jvm.ShowByteCode
 minor version: 0
 major version: 55
 flags: ACC_PUBLIC, ACC_SUPER
 Constant pool:
 #1 = Methodref          #6.#20         // java/lang/Object."<init>":()V
 #2 = Fieldref           #21.#22        // java/lang/System.out:Ljava/io/PrintStream;
 #3 = String             #23            // Hello World!
 #4 = Methodref          #24.#25        // java/io/PrintStream.println:(Ljava/lang/String;)V
 #5 = Class              #26            // org/pzy/java/base/ShowByteCode
 #6 = Class              #27            // java/lang/Object
 #7 = Utf8               <init>
 #8 = Utf8               ()V
 #9 = Utf8               Code
 #10 = Utf8               LineNumberTable
 #11 = Utf8               LocalVariableTable
 #12 = Utf8               this
 #13 = Utf8               Lorg/pzy/java/base/ShowByteCode;
 #14 = Utf8               main
 #15 = Utf8               ([Ljava/lang/String;)V
 #16 = Utf8               args
 #17 = Utf8               [Ljava/lang/String;
 #18 = Utf8               SourceFile
 #19 = Utf8               ShowByteCode.java
 #20 = NameAndType        #7:#8          // "<init>":()V
 #21 = Class              #28            // java/lang/System
 #22 = NameAndType        #29:#30        // out:Ljava/io/PrintStream;
 #23 = Utf8               Hello World!
 #24 = Class              #31            // java/io/PrintStream
 #25 = NameAndType        #32:#33        // println:(Ljava/lang/String;)V
 #26 = Utf8               org/pzy/java/base/ShowByteCode
 #27 = Utf8               java/lang/Object
 #28 = Utf8               java/lang/System
 #29 = Utf8               out
 #30 = Utf8               Ljava/io/PrintStream;
 #31 = Utf8               java/io/PrintStream
 #32 = Utf8               println
 #33 = Utf8               (Ljava/lang/String;)V
 {
 public org.pzy.java.jvm.ShowByteCode();
 descriptor: ()V
 flags: ACC_PUBLIC
 Code:
 stack=1, locals=1, args_size=1
 0: aload_0
 1: invokespecial #1                  // Method java/lang/Object."<init>":()V
 4: return
 LineNumberTable:
 Code:
 stack=2, locals=1, args_size=1
 0: getstatic     #2                  // Field java/lang/System.out:Ljava/io/PrintStream;
 3: ldc           #3                  // String Hello World!
 5: invokevirtual #4                  // Method java/io/PrintStream.println:(Ljava/lang/String;)V
 8: return
 LineNumberTable:
 line 9: 0
 line 10: 8
 LocalVariableTable:
 Start  Length  Slot  Name   Signature
 0       9     0  args   [Ljava/lang/String;
 }
 SourceFile: "ShowByteCode.java"

 */

/**
 * IDEA Show Bytecode
 *
 // class version 55.0 (55)
 // access flags 0x21
 public class org/pzy/java/base/ShowByteCode {

 // compiled from: ShowByteCode.java

 // access flags 0x1
 public <init>()V
 L0
 LINENUMBER 7 L0
 ALOAD 0
 INVOKESPECIAL java/lang/Object.<init> ()V
 RETURN
 L1
 LOCALVARIABLE this Lorg/pzy/java/base/ShowByteCode; L0 L1 0
 MAXSTACK = 1
 MAXLOCALS = 1

 // access flags 0x9
 public static main([Ljava/lang/String;)V
 L0
 LINENUMBER 9 L0
 GETSTATIC java/lang/System.out : Ljava/io/PrintStream;
 LDC "Hello World!"
 INVOKEVIRTUAL java/io/PrintStream.println (Ljava/lang/String;)V
 L1
 LINENUMBER 10 L1
 RETURN
 L2
 LOCALVARIABLE args [Ljava/lang/String; L0 L2 0
 MAXSTACK = 2
 MAXLOCALS = 1
 }

 */
public class ShowByteCode {
    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}
